package com.b.domain;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 系统通知表
    */
@Document(indexName = "systemnotification")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SystemNotification {
    /**
    * 通知ID
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 接收者ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer userId;

    /**
    * 通知内容
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String content;

    /**
    * 通知类型（系统/活动/私信）
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String type;

    /**
    * 是否已读
    */
    @Field(type = FieldType.Boolean, index = true , store = true)
    private Boolean isRead;

    /**
    * 时间
    */
    @Field(type = FieldType.Date, index = false , store = true)
    private Date createTime;
}